package cn.swenty.backstage.sso.server.service;

import org.springframework.stereotype.Service;

import cn.swenty.backstage.sso.server.dto.User;
import cn.swenty.backstage.sso.server.entity.SysUserInfo;

@Service
public class UserService {
	
	public User findByUseraccount(String account){
		SysUserInfo info = new SysUserInfo();
		info.put("Account", account);
		info = info.queryOne();
		User user = null;
		if(info != null){
			 user = new User();
			 user.setAccount(info.getStr("Account"));
			 user.setClientIP(info.getStr("ClientIP"));
			 user.setStatus(info.getInt("status"));
			 user.setNickName(info.getStr("NickName"));
			 user.setPassword(info.getStr("Password"));
		}
		return user;
	}
	

}
